package
        com.zzc.sale.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hos.entity.stock.Purchase;
import com.hos.entity.stock.PurchaseItem;
import com.hos.vo.Result;
import com.zzc.sale.vo.PurchaseVo;
import io.swagger.models.properties.PropertyBuilder;

import java.util.List;
import java.util.Objects;

/**
 * @author：xIAO_ZHOU_TX
 * @date：Created in 2023/12/18 16:20
 * @description：
 * @modified By：
 * @version:
 */
public interface PurchaseService {
    /**
     * 分页查询所有订单数据
     * @param purchaseVo
     * @return
     */
    Page<Purchase> listPurchaseForPage(PurchaseVo purchaseVo);

    /**
     * 随机生成订单id
     * @return
     */
    String generatePurchaseId();



    /**
     * 分页查询所有的待审核采购单数据
     * @param purchaseVo
     * @return
     */

    Page<Purchase> listPurchasePendingForPage(PurchaseVo purchaseVo);

    /**
     * 根据id修改审核状态==>审核通过
     * @param purchaseId
     * @return
     */
    Integer auditPass(String purchaseId);
    /**
     * 根据id修改审核状态==>审核不通过
     * @param purchaseId
     * @return
     */
    Integer auditNoPass(String purchaseId,String auditMsg);

    /**
     * 提交审核【根据采购单号】
     * @param purchaseId
     * @return
     */
    Result doAudit(String purchaseId);

    /**
     * 作废【根据采购单号】
     * @param purchaseId
     * @return
     */
    Result doInvalid(String purchaseId);

    Integer addPurchase(Purchase purchase);

    /**
     * 入库操作
     * @param purchaseId
     * @return
     */
    Result doInventory(String purchaseId);

    /**
     * 根据id查询状态
     * @param purchaseId
     * @return
     */
    String getStatusById(String purchaseId);
}